package br.com.felix.fwt.ui.javascript;

/**
 * The Class Javascript is used to encapsulate Javascript code.
 * The idea is that as the component library grows, there is no more need to
 * write Javascript. 
 * 
 * @author UP2F
 */
public abstract class Javascript {
	
	/**
	 * This method returns the actual script that will be printed in the HTML.
	 * 
	 * @return the javascript code associated with this Javascript class.
	 */
	public abstract String script();
	
	/** 
	 * @see br.com.felix.fwt.ui.javascript.Javascript#script()
	 */
	@Override
	public String toString(){
		return script();
	}
}
